
//页面拖动
mui('.mui-scroll-wrapper').scroll({
	deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
});

		
//js获取兄弟节点
function sibling( elem ) {
var r = [];
var n = elem.parentNode.firstChild;
for ( ; n; n = n.nextSibling ) {
if ( n.nodeType === 1 && n !== elem ) {
r.push( n );
}
}
 
return r;
}



/*
 * 城市列表字母排序
 * */
function sortCity(cities){
//	var childList = new Array();
	
	var childList = cities;
	childList.sort();//按字母排序
//	childList.areaName.sort(function(a,b){return a.localeCompare(b)});	//按字母排序

	var firstLetter;
	var a=[],b=[],c=[],d=[],c=[],d=[],e=[],f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[],p=[],q=[],r=[],s=[],t=[],u=[],v=[],w=[],x=[],y=[],z=[];
	a[0] = '<p style="margin:-10px;" id="A">A</p>';
	b[0] = '<p style="margin:-10px;" id="B">B</p>';
	c[0] = '<p style="margin:-10px;" id="C">C</p>';
	d[0] = '<p style="margin:-10px;" id="D">D</p>';
	e[0] = '<p style="margin:-10px;" id="E">E</p>';
	f[0] = '<p style="margin:-10px;" id="F">F</p>';
	g[0] = '<p style="margin:-10px;" id="G">G</p>';
	h[0] = '<p style="margin:-10px;" id="H">H</p>';
	i[0] = '<p style="margin:-10px;" id="I">I</p>';
	j[0] = '<p style="margin:-10px;" id="J">J</p>';
	k[0] = '<p style="margin:-10px;" id="K">K</p>';
	l[0] = '<p style="margin:-10px;" id="L">L</p>';
	m[0] = '<p style="margin:-10px;" id="M">M</p>';
	n[0] = '<p style="margin:-10px;" id="N">N</p>';
	o[0] = '<p style="margin:-10px;" id="O">O</p>';
	p[0] = '<p style="margin:-10px;" id="P">P</p>';
	q[0] = '<p style="margin:-10px;" id="Q">Q</p>';
	r[0] = '<p style="margin:-10px;" id="R">R</p>';
	s[0] = '<p style="margin:-10px;" id="S">S</p>';
	t[0] = '<p style="margin:-10px;" id="T">T</p>';
	u[0] = '<p style="margin:-10px;" id="U">U</p>';
	v[0] = '<p style="margin:-10px;" id="V">V</p>';
	w[0] = '<p style="margin:-10px;" id="W">W</p>';
	x[0] = '<p style="margin:-10px;" id="X">X</p>';
	y[0] = '<p style="margin:-10px;" id="Y">Y</p>';
	z[0] = '<p style="margin:-10px;" id="Z">Z</p>';
	
	var pinYinCity = new Array();
	
	for (var idx =0 ; idx<childList.length; idx++) {
					pinYinCity.push(pinYin.callMe(childList[idx].areaName));
					firstLetter = pinYinCity[idx].slice(0,1);	//获取首字母
					switch(firstLetter){
						case 'A':
							a.push(childList[idx]);continue;
						case 'B':
							b.push(childList[idx]);continue;
						case 'C':
							c.push(childList[idx]);continue;
						case 'D':
							d.push(childList[idx]);continue;
						case 'E':
							e.push(childList[idx]);continue;
						case 'F':
							f.push(childList[idx]);continue;
						case 'G':
							g.push(childList[idx]);continue;
						case 'H':
							h.push(childList[idx]);continue;
						case 'I':
							i.push(childList[idx]);continue;
						case 'J':
							j.push(childList[idx]);continue;
						case 'K':
							k.push(childList[idx]);continue;
						case 'L':
							l.push(childList[idx]);continue;
						case 'M':
							m.push(childList[idx]);continue;
						case 'N':
							n.push(childList[idx]);continue;
						case 'O':
							o.push(childList[idx]);continue;
						case 'P':
							p.push(childList[idx]);continue;
						case 'Q':
							q.push(childList[idx]);continue;
						case 'R':
							r.push(childList[idx]);continue;
						case 'S':
							s.push(childList[idx]);continue;
						case 'T':
							t.push(childList[idx]);continue;
						case 'U':
							u.push(childList[idx]);continue;
						case 'V':
							v.push(childList[idx]);continue;
						case 'W':
							w.push(childList[idx]);continue;
						case 'X':
							x.push(childList[idx]);continue;
						case 'Y':
							y.push(childList[idx]);continue;
						case 'Z':
							z.push(childList[idx]);continue;
						default:
							break;
					}
//					console.log(childList[i]);
					
			}
	
	if(a.length<2)a=[];
	if(b.length<2)b=[];
	if(c.length<2)c=[];
	if(d.length<2)d=[];
	if(e.length<2)e=[];
	if(f.length<2)f=[];
	if(g.length<2)g=[];
	if(h.length<2)h=[];
	if(i.length<2)i=[];
	if(j.length<2)j=[];
	if(k.length<2)k=[];
	if(l.length<2)l=[];
	if(m.length<2)m=[];
	if(n.length<2)n=[];
	if(o.length<2)o=[];
	if(p.length<2)p=[];
	if(q.length<2)q=[];
	if(r.length<2)r=[];
	if(s.length<2)s=[];
	if(t.length<2)t=[];
	if(u.length<2)u=[];
	if(v.length<2)v=[];
	if(w.length<2)w=[];
	if(x.length<2)x=[];
	if(y.length<2)y=[];
	if(z.length<2)z=[];
	
				var pushCities = a.concat(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z);//合并数组
				
				return pushCities;
}
